Skip Headers
Oracle® Retail Service Backbone Developers Guide
14.0
E49441-01
  Go To Table Of Contents
Contents

Previous
Previous
 
Next
Next
 

5 Introduction to Injector Service

Injector Service is a mechanism for external web services to subscribe data published in RIB topics. In the absence of this method, external applications will always have to subscribe directly to RIB JMS topics and parse the messages. With help of the injector service, RIB can now invoke external web services to send messages to those applications.

Injector Service Implementation in RSB

RSB has a service integration flow which is based on RIB injector service. The purpose of this service integration flow is to route messages from RIB-OMS application to RSB decorator services. This service integration flow is an OSB project and it is available in RsbServiceIntegrationFlowPak14.0.0ForRibOmsToRsbOmsRouting_eng_ga.zip PAK. The OSB jar packaged inside the PAK is RibOmsToRsbOmsRouting-ServicesIntegrationFlow.jar.

This OSB jar contains a Proxy Service which is based on Injector Service WSDL. The name of the proxy service is RibOmsToRsbOmsRoutingService. The WSDL contains an operation named as injectMessage(). This operation requires four parameters: message family, message type, business object ID and payload. When RIB-OMS application receives a message on one of its topics, it builds the request message with appropriate values for the parameters and invokes injectMessage() method of the RibOmsToRsbOmsRoutingService proxy service. Business Object Id is an optional parameter and it may be null but rest of the parameters are required.

How to import RSB-OMS routing service in OEPE

  1. Copy the RibOmsToRsbOmsRouting-ServicesIntegrationFlow.jar to RSB_WORK_AREA/service-integration-flows folder. The directory structure looks like this:

    Surrounding text describes image243.png.
  2. Now we need to import this jar in OEPE. To import the jar, right-click RSBConfiguration and select Import > Oracle Service Bus - Configuration Jar.

    Surrounding text describes image245.png.
  3. Click Browse and select the jar file.

    Surrounding text describes image247.png.
  4. Click Next button. It will show all the files available in the jar.

    Surrounding text describes image249.png.
  5. Click Finish. The jar is imported as an OSB project and the project structure looks like the following:

    Surrounding text describes image251.png.

Message Flow in RSB-OMS Routing Service

The following diagrams show the message flow in the proxy service of the routing project. The whole message flow does not fit in once screenshot, so the first picture shows message flow at a high-level; it shows all the pipelines that define the message flow.

Surrounding text describes image253.png.

The next screenshot is of the updateSoapRequest pipeline-pair where most of the message processing takes place.

Surrounding text describes image255.png.

When RibOmsToRsbOmsRoutingService proxy service receives the request XML, it executes the message flow. The sequence of activities in the flow is explained below:

The following table contains the combination of Message Family and Message Type that are dropped by routing service:

Table 5-1 Message Family and Message Type

Message Family Message Type

pendreturn

pendretcre

pendreturn

pendretmod

pendreturn

pendretdel

pendreturn

pendretdtlcre

pendreturn

pendretdtlmod

pendreturn

pendretdtldel

asnout

asnoutmod

receiving

appointcre

receiving

appointdel

receiving

receiptcre

receiving

receiptmod

receiving

appointdtlcre

receiving

appointdtldel

receiving

appointdtlmod

receiving

appointhdrmod


The following table contains the list of decorator service URI to which messages with combination of Message Family, Message type are routed:

Table 5-2 List of decorator service

Message Family Message Type Decorator Service URI

pendreturn

rtrnrcptnotify

oms-OrderReturn-AppServiceDecorator/ProxyService/OrderReturnAppServiceLocalProxy

pendreturn

rtrncomplete

oms-OrderReturn-AppServiceDecorator/ProxyService/OrderReturnAppServiceLocalProxy

sostatus

sostatuscre

oms-StockOrderStatus-AppServiceDecorator/ProxyService/StockOrderStatusAppServiceLocalProxy

asnout

asnoutcre

oms-AdvancedShipmentNotification-AppServiceDecorator/ProxyService/AdvancedShipmentNotificationAppServiceLocalProxy

fulfilordcfm

fulfilordcfmcre

oms-FulfillOrderConfirm-AppServiceDecorator/ProxyService/FulfillOrderConfirmAppServiceLocalProxy

fulfilordcfmcnc

fulfilordcfmcnccre

oms-FulfillOrderCancelConfirm-AppServiceDecorator/ProxyService/FulfillOrderCancelConfirmAppServiceLocalProxy

asnin

asnincre

oms-VendorShipmentNotification-AppServiceDecorator/ProxyService/VendorShipmentNotificationAppServiceLocalProxy

asnin

asninmod

oms-VendorShipmentNotification-AppServiceDecorator/ProxyService/VendorShipmentNotificationAppServiceLocalProxy

asnin

asnindel

oms-VendorShipmentNotification-AppServiceDecorator/ProxyService/VendorShipmentNotificationAppServiceLocalProxy

receiving

receiptordcre

oms-CustomerOrder-AppServiceDecorator/ProxyService/CustomerOrderAppServiceLocalProxy


How to add new routing flow in RSB-OMS Routing Service

The table 5-2 contains the list of all decorator URIs services to which RibOmsToRsbOmsRoutingService routes the messages. It is also possible to add routing to a new decorator service by modifying XQuery files in the OSB project. This document covers only the RSB side of changes. For adding message flow for a new message family and message type from RIB, there are changes required in RIB side too. Please refer to RIB documents for changes in the RIB side. This document assumes that RIB-OMS application can invoke the RibOmsToRsbOmsRoutingService for a new message family and message type and now RibOmsToRsbOmsRoutingService needs to route those messages to the appropriate decorator. Follow the steps to achieve the same:

  1. If the message needs to be just dropped by RibOmsToRsbOmsRoutingService and not to be processed further, the only change required in the project is to add the new message family and type in the isMessageOfDropType xquery file.

  2. If the message need not be dropped and should be routed to a decorator, then there are no changes required in isMessageOfDropType file. In this case, open the buildRoutingContext xquery file. This xquery builds the path to the target decorator service.

  3. For routing to a decorator service, the request message also needs to contain the operation name and namespace for the target service. To set new operation name and namespace in the request message, open the setNamespaceAndOperationInSoapBody xquery file and add appropriate code.

The changes to the three xquery files are all that is needed in OSB project. There is a properties file in rsb-home that also needs to be modified. This properties file is used by RSB builder tool to update RSB artifacts appropriately.